import request from '@/utils/request'

// 获取结算信息
export const getOrderInfoAPI = () => request({
  url: '/member/order/pre'
})

// 添加-收货地址
export const addAddressAPI = (formObj) => {
  return request({
    url: '/member/address',
    method: 'POST',
    data: formObj
  })
}
// 获取-收货地址列表
export const getAddressListAPI = () => {
  return request({
    url: '/member/address'
  })
}
// 创建订单(结算->支付页面)(把用户收货地址, 支付方式等数据传递给后台, 后台产生一个订单id)
export const createOrderAPI = (data) => request({
  url: '/member/order',
  method: 'post',
  data
})
